package com.nokia.pc3.core.xform;

import org.codehaus.jackson.annotate.JsonProperty;

/**
 * Encapsulates xformOutlist DAC descriptor information per job.
 * 
 * @author jcroke
 * 
 */
public class XformLabelOut implements Comparable<XformLabelOut> {

	private String labelIn;
	private String labelOut;
	private String index;

	@JsonProperty("labelIn")
	public String getLabelIn() {
		return labelIn;
	}

	@JsonProperty("labelIn")
	public void setLabelIn(String labelIn) {
		this.labelIn = labelIn;
	}

	@JsonProperty("labelOut")
	public String getLabelOut() {
		return labelOut;
	}

	@JsonProperty("labelOut")
	public void setLabelOut(String labelOut) {
		this.labelOut = labelOut;
	}

	@JsonProperty("index")
	public String getIndex() {
		return index;
	}

	@JsonProperty("index")
	public void setIndex(String index) {
		this.index = index;
	}

	@Override
	public int compareTo(XformLabelOut o) {
		Integer oI = Integer.parseInt(o.getIndex());
		Integer tI = Integer.parseInt(this.getIndex());

		return (tI - oI == 0 ? 0 : (tI - oI > 0 ? 1 : -1));
	}

}